import request from '@/utils/request'

// 查询账单明细列表
export function listPayExcels(query) {
  return request({
    url: '/business/payExcels/list',
    method: 'get',
    params: query
  })
}

// 查询账单明细详细
export function getPayExcels(id) {
  return request({
    url: '/business/payExcels/' + id,
    method: 'get'
  })
}

// 删除账单明细
export function delPayExcels(id) {
  return request({
    url: '/business/payExcels/' + id,
    method: 'delete'
  })
}

// 导出文件
export function exportExcel(data){
  return request({
    url: '/business/payExcels/export',
    method: 'post',
    data: data,
  })
}

// 账单上传
export function importCsv(data) {
  return request({
    url: '/business/payExcels/importCsv',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': undefined // 明确禁止设置Content-Type
    }
  })
}

// 查看明细
export function getPayDetails(query){
  return request({
    url: '/business/payExcels/getPayDetails',
    method: 'get',
    params: query
  })
}

// 重新生成
export function reGenerate(data){
  return request({
    url: '/business/payExcels/reGenerate/',
    method: 'post',
    data: data
  })
}
